<template>
<view>
	<view class="search">
	  <view class="search-area">
	    <input type="text" placeholder="输入汽车名称"></input>
	    <button>搜索</button>
	  </view>
	</view>
	<view class="cproductlist">
	  <view class="clist">
	    <scroll-view scroll-y='true' :style="winHeight">
	      <view class="citems">
	        <text class="cur">大众</text>
	        <text>宝马</text>
	        <text>奥迪</text>
	        <text>阿斯顿·马丁</text>
	        <text>奔驰</text>
	        <text>本田</text>
	        <text>别克</text>
	        <text>比亚迪</text>
	        <text>保时捷</text>
	        <text>大众</text>
	        <text>宝马</text>
	        <text>奥迪</text>
	        <text>阿斯顿·马丁</text>
	        <text>奔驰</text>
	        <text>本田</text>
	        <text>别克</text>
	        <text>比亚迪</text>
	        <text>保时捷</text>
	        <text>大众</text>
	        <text>宝马</text>
	        <text>奥迪</text>
	        <text>阿斯顿·马丁</text>
	        <text>奔驰</text>
	        <text>本田</text>
	        <text>别克</text>
	        <text>比亚迪</text>
	        <text>保时捷</text>
	      </view>
	    </scroll-view>
	  </view>
	
	  <view class="productlist">
	    <scroll-view class="cpscroll" scroll-y='true' :style="winHeight">
	      <view class="pitems">
	        <view class="p-item">
	          <navigator url="/pages/product/product">
	            <image src="/static/p1.jpg" mode="widthFix"></image>
	            <text class="pname">奔驰A级 2019款 A180 L</text>
	            <text>￥232,460</text>
	          </navigator>
	        </view>
	        <view class="p-item">
	          <navigator url="/pages/product/product">
	            <image src="/static/p2.jpg" mode="widthFix"></image>
	            <text class="pname">奔驰A级 2019款 A180 L</text>
	            <text>￥232,460</text>
	          </navigator>
	        </view>
	        <view class="p-item">
	          <navigator url="/pages/product/product">
	            <image src="/static/p2.jpg" mode="widthFix"></image>
	            <text class="pname">奔驰A级 2019款 A180 L</text>
	            <text>￥232,460</text>
	          </navigator>
	        </view>
	        <view class="p-item">
	          <navigator url="/pages/product/product">
	            <image src="/static/p3.jpg" mode="widthFix"></image>
	            <text class="pname">奔驰A级 2019款 A180 L</text>
	            <text>￥232,460</text>
	          </navigator>
	        </view>
	        <view class="p-item">
	          <navigator url="/pages/product/product">
	            <image src="/static/p4.jpg" mode="widthFix"></image>
	            <text class="pname">奔驰A级 2019款 A180 L</text>
	            <text>￥232,460</text>
	          </navigator>
	        </view>
	        <view class="p-item">
	          <navigator url="/pages/product/product">
	            <image src="/static/p5.jpg" mode="widthFix"></image>
	            <text class="pname">奔驰A级 2019款 A180 L</text>
	            <text>￥232,460</text>
	          </navigator>
	        </view>
	        <view class="p-item">
	          <navigator url="/pages/product/product">
	            <image src="/static/p5.jpg" mode="widthFix"></image>
	            <text class="pname">奔驰A级 2019款 A180 L</text>
	            <text>￥232,460</text>
	          </navigator>
	        </view>
	        <view class="p-item">
	          <navigator url="/pages/product/product">
	            <image src="/static/p5.jpg" mode="widthFix"></image>
	            <text class="pname">奔驰A级 2019款 A180 L</text>
	            <text>￥232,460</text>
	          </navigator>
	        </view>
	      </view>
	    </scroll-view>
	  </view>
	
	</view>
</view>
</template>

<script>
	export default {
		data() {
			return {
				winHeight: '',
			}
		},
		onLoad(){
			uni.getSystemInfo({
			      success: (res)=> {
					  console.log(res)
			        this.winHeight='height:'+res.windowHeight+'px'
			        }
			    })
		},
		methods: {
			
		}
	}
</script>

<style>

.cproductlist {
  display: flex;
}

.clist {
  width: 25%;
  background-color:#F8F8FF;
 
}
.clist .citems{
    display: flex;
    flex-direction:column;
    height: 100%;
}
.clist text{
   font-size: 28rpx;
  line-height: 80rpx;
  text-align: center;
}
.clist .cur{
  background-color: white;
}

.productlist {
  flex: 1;
}
.pitems{
  width:100%;
display: flex;
flex-direction: row;
flex-wrap:wrap;
  align-content: flex-start;
  justify-content: space-evenly;
  height: 100%;
  border-radius: 8rpx;
}

.p-item {
  width: 45%;
  margin: 8rpx 0;
   box-shadow: 0 0 8rpx #eeeded;
}

.p-item navigator {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.p-item text{
  text-align: center;
  font-size: 24rpx;
  padding:16rpx;
  width:100%;
  white-space:nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.p-item image {
  width: 100%;
}
</style>
